using System;
using System.Linq;
using CodeGeneratorLibrary;
using Templates.Interfaces;

namespace Templates.Bitrix.Admin.EditPage
{
	public partial class SapEditBaseClass : ICodeFile
	{
		private Table _table;

		public void BindData(Table table)
		{
			_table = table;
		}
		public string EntityName { get { return _table.EntityName; } }

		public string ClassName
		{
			get { return string.Format("BaseSap{0}Edit", _table.EntityName); }
		}

		public string ProjectFileType { get { return "Compile"; } }


		public string IViewNamespace { get; set; }
		public string PresenterNamespace { get; set; }
		public string IView { get; set; }
		public string Presenter { get; set; }
		public string ListPage { get; set; }
		public string EditPage { get; set; }

		protected string PK { get { return _table.Columns.First(x => x.IsPK).Name; } }


		public string Namespace { get { return "bitrix.admin"; } }



		public string ProjectFilePath { get { return @"App_Code\bitrix\admin\sap\" + ClassName + ".gen.cs"; } }

		public string ProjFullName { get { return @"D:\Work\SAP Event\Sources\SAP-EventsSite\"; } }
/*
		public string ProjFullName { get { return @"C:\Users\Administrator\Documents\Visual Studio 2010\Projects\ClassLibrary2\ClassLibrary2\ClassLibrary2.csproj"; } }		
*/	}
}